home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / timecodes / qttimecode / qttimecode.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.4 KB  |  76 lines

  1. //////////
  2. //
  3. //    File:        QTTimeCode.h
  4. //
  5. //    Contains:    QuickTime timecode media handler sample code.
  6. //
  7. //    Written by:    Tim Monroe
  8. //                based on AddTC.c sample code by QT Engineering and Apple Developer Technical Support.
  9. //
  10. //    Copyright:    © 1991 - 1998 by Apple Computer, Inc., all rights reserved.
  11. //
  12. //    Change History (most recent first):
  13. //
  14. //       <1>         05/18/98    rtm        first file; conversion to personal coding style; updated to latest headers
  15. //     
  16. //////////
  17.  
  18. #include "ComApplication.h"
  19.  
  20. #include <Dialogs.h>
  21. #include <FixMath.h>
  22. #include <Components.h>
  23. #include <Movies.h>
  24. #include <QuickTimeComponents.h>
  25.  
  26. #if TARGET_OS_MAC
  27. #include "MacFramework.h"
  28. #endif
  29.  
  30. #if TARGET_OS_WIN32
  31. #include "WinFramework.h"
  32. #endif
  33.  
  34. #define kTimeCodeTrackSize                (20 << 16)                // initial height and width of timecode track
  35.  
  36. #define kTimeCodeDialogID                200
  37. #define kTimeCodeAlertID                201
  38.  
  39. #define kItemSrcName                    4
  40. #define kItemDisplayTimeCode            5
  41. #define kItemTimeScale                    7
  42. #define kItemFrameDur                    9
  43. #define kItemNumFrames                    11
  44.  
  45. #define kItemUseTC                        12
  46. #define kItemUseCounter                    13
  47.  
  48. #define kItemDropFrame                    14
  49. #define kItem24Hour                        (kItemDropFrame + 1)
  50. #define kItemNegOK                        (kItem24Hour + 1)
  51. #define kItemIsNeg                        (kItemNegOK + 2)
  52. #define kItemHours                        (kItemIsNeg + 1)
  53. #define kItemMinutes                    (kItemHours + 1)
  54. #define kItemSeconds                    (kItemMinutes + 1)
  55. #define kItemFrames                        (kItemSeconds + 1)
  56.  
  57. #define kItemCounter                    24
  58. #define kItemBelowVideo                    25
  59.  
  60.  
  61. // function prototypes
  62. void                        QTTC_DeleteTimeCodeTracks (Movie theMovie);
  63. OSErr                        QTTC_AddTimeCodeToMovie (Movie theMovie, OSType theType);
  64. Boolean                        QTTC_GetTimeCodeOptions (void);
  65. void                        QTTC_SetDialogTextNumber (DialogPtr theDialog, short theItem, long theNumber);
  66. void                        QTTC_SetDialogTextString (DialogPtr theDialog, short theItem, StringPtr theString);
  67. Boolean                        QTTC_ValidateDialogLong (DialogPtr theDialog, short theItem, long *theResult);
  68. ControlHandle                QTTC_GetDItemHandle (DialogPtr theDialog, short theItem);
  69. ControlHandle                QTTC_GetDItemRect (DialogPtr theDialog, short theItem, Rect *theRect);
  70. void                        QTTC_ShowCurrentTimeCode (Movie theMovie);
  71. void                        QTTC_ShowTimeCodeSource (Movie theMovie);
  72. void                        QTTC_ShowStringToUser (StringPtr theString);
  73. void                        QTTC_ToggleTimeCodeDisplay (MovieController theMC);
  74. MediaHandler                QTTC_GetTimeCodeMediaHandler (Movie theMovie);
  75. Boolean                        QTTC_MovieHasTimeCodeTrack (Movie theMovie);
  76.